mirror of
https://github.com/acid-info/Kurate.git
synced 2025-01-12 08:54:08 +00:00
fix: submit post (#315)
This commit is contained in:
parent
fe987feb06
commit
71930ae827
@ -279,17 +279,18 @@ export class Firebase implements Adapter {
|
||||
images: string[],
|
||||
signer: Signer,
|
||||
): Promise<void> {
|
||||
const address = await signer.getAddress()
|
||||
const isMemberOfGroup = get(personas).all.get(groupId)?.participants?.includes(address)
|
||||
|
||||
const post = {
|
||||
timestamp: Date.now(),
|
||||
text,
|
||||
images,
|
||||
promote: [],
|
||||
demote: [],
|
||||
address,
|
||||
}
|
||||
|
||||
const address = await signer.getAddress()
|
||||
const isMemberOfGroup = get(personas).all.get(groupId)?.participants?.includes(address)
|
||||
|
||||
if (!isMemberOfGroup) {
|
||||
await signer.signMessage('This "transaction" joins the persona')
|
||||
const personaDoc = doc(db, `personas/${groupId}`)
|
||||
@ -300,7 +301,7 @@ export class Firebase implements Adapter {
|
||||
|
||||
// Store post to pending
|
||||
const pendingPosts = collection(db, `personas/${groupId}/pending`)
|
||||
addDoc(pendingPosts, { post, address })
|
||||
addDoc(pendingPosts, post)
|
||||
|
||||
const profileCollection = collection(db, `users/${address}/transactions`)
|
||||
await addDoc(profileCollection, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user